package com.blog.admin.controller;

import com.blog.admin.service.FileInfoService;
import com.blog.common.core.web.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 图片控制器
 * </p>
 *
 * @author Valerie
 * @date 2023/6/3
 **/
@RestController
@Api("图片控制器")
@RequiredArgsConstructor
public class FileInfoController {

    private final FileInfoService fileInfoService;

    /**
     * 查询所有图片
     *
     * @return {@link AjaxResult}
     */
    @ApiOperation("查询所有图片")
    @GetMapping("/fileInfo/list")
    public AjaxResult listFileInfo(){
        return AjaxResult.success(fileInfoService.listFileInfo());
    }


}
